WTL Controls
Back to the WTL Controls Home Page.
BIS_WTL_CONTROLS::CToolTipPlus Class Reference

A CToolTipCtrl descendant providing a couple added member functions making it easier and more convenient to use. More...

#include <ToolTipPlus.h>

Inheritance diagram for BIS_WTL_CONTROLS::CToolTipPlus:

Public Member Functions

 CToolTipPlus () noexcept
 
virtual ~CToolTipPlus ()
 
BOOL AddWindowTool (HWND pWnd, LPCTSTR pszText)
 Add a tooltip to a child window control. More...
 
BOOL AddRectTool (HWND pWnd, LPCTSTR pszText, LPCRECT pRect, UINT nIDTool)
 Add a tooltip to an arbitrary rectangular region. More...
 

Detailed Description

A CToolTipCtrl descendant providing a couple added member functions making it easier and more convenient to use.

Credit where it's due - as I recall, this code is originally from Jeff Prosize's 'Programming Windows with MFC'.

Typical usage is depicted below.

CToolTipPlus m_ToolTip;
m_ToolTip.Create(m_hWnd);
m_ToolTip.AddWindowTool(m_Edit1.m_hWnd, _T("Tool tips rule."));

Definition at line 39 of file ToolTipPlus.h.

Constructor & Destructor Documentation

◆ CToolTipPlus()

BIS_WTL_CONTROLS::CToolTipPlus::CToolTipPlus ( )
noexcept

Definition at line 20 of file ToolTipPlus.cpp.

◆ ~CToolTipPlus()

BIS_WTL_CONTROLS::CToolTipPlus::~CToolTipPlus ( )
virtual

Definition at line 24 of file ToolTipPlus.cpp.

Member Function Documentation

◆ AddWindowTool()

BOOL BIS_WTL_CONTROLS::CToolTipPlus::AddWindowTool ( HWND  hWnd,
LPCTSTR  pszText 
)

Add a tooltip to a child window control.

Parameters
hWndThe window handle of the control you are adding a tooltip for.
pszTextThe text to add to the tooltip.
Return values
BOOLCToolTipPlus::AddWindowTool

Definition at line 39 of file ToolTipPlus.cpp.

◆ AddRectTool()

BOOL BIS_WTL_CONTROLS::CToolTipPlus::AddRectTool ( HWND  hWnd,
LPCTSTR  pszText,
LPCRECT  lpRect,
UINT  nIDTool 
)

Add a tooltip to an arbitrary rectangular region.

Parameters
hWndThe handle of the window to which you're adding a tooltip.
pszTextThe tooltip text.
lpRectThe rectangle where the tip will be triggered.
nIDToolArbitrary ID for this tooltip.
Return values
BOOLCToolTipPlus::AddRectTool

Definition at line 65 of file ToolTipPlus.cpp.


The documentation for this class was generated from the following files: